/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entityprojet;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Ron
 */
@Entity
@Table(name = "F_COLLABORATEUR")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FCollaborateur.findAll", query = "SELECT f FROM FCollaborateur f"),
    @NamedQuery(name = "FCollaborateur.findByCONo", query = "SELECT f FROM FCollaborateur f WHERE f.cONo = :cONo"),
    @NamedQuery(name = "FCollaborateur.findByCONom", query = "SELECT f FROM FCollaborateur f WHERE f.cONom = :cONom"),
    @NamedQuery(name = "FCollaborateur.findByCOPrenom", query = "SELECT f FROM FCollaborateur f WHERE f.cOPrenom = :cOPrenom"),
    @NamedQuery(name = "FCollaborateur.findByCOFonction", query = "SELECT f FROM FCollaborateur f WHERE f.cOFonction = :cOFonction"),
    @NamedQuery(name = "FCollaborateur.findByCOAdresse", query = "SELECT f FROM FCollaborateur f WHERE f.cOAdresse = :cOAdresse"),
    @NamedQuery(name = "FCollaborateur.findByCOComplement", query = "SELECT f FROM FCollaborateur f WHERE f.cOComplement = :cOComplement"),
    @NamedQuery(name = "FCollaborateur.findByCOCodePostal", query = "SELECT f FROM FCollaborateur f WHERE f.cOCodePostal = :cOCodePostal"),
    @NamedQuery(name = "FCollaborateur.findByCOVille", query = "SELECT f FROM FCollaborateur f WHERE f.cOVille = :cOVille"),
    @NamedQuery(name = "FCollaborateur.findByCOCodeRegion", query = "SELECT f FROM FCollaborateur f WHERE f.cOCodeRegion = :cOCodeRegion"),
    @NamedQuery(name = "FCollaborateur.findByCOPays", query = "SELECT f FROM FCollaborateur f WHERE f.cOPays = :cOPays"),
    @NamedQuery(name = "FCollaborateur.findByCOService", query = "SELECT f FROM FCollaborateur f WHERE f.cOService = :cOService"),
    @NamedQuery(name = "FCollaborateur.findByCOVendeur", query = "SELECT f FROM FCollaborateur f WHERE f.cOVendeur = :cOVendeur"),
    @NamedQuery(name = "FCollaborateur.findByCOCaissier", query = "SELECT f FROM FCollaborateur f WHERE f.cOCaissier = :cOCaissier"),
    @NamedQuery(name = "FCollaborateur.findByCODateCreation", query = "SELECT f FROM FCollaborateur f WHERE f.cODateCreation = :cODateCreation"),
    @NamedQuery(name = "FCollaborateur.findByCOAcheteur", query = "SELECT f FROM FCollaborateur f WHERE f.cOAcheteur = :cOAcheteur"),
    @NamedQuery(name = "FCollaborateur.findByCOTelephone", query = "SELECT f FROM FCollaborateur f WHERE f.cOTelephone = :cOTelephone"),
    @NamedQuery(name = "FCollaborateur.findByCOTelecopie", query = "SELECT f FROM FCollaborateur f WHERE f.cOTelecopie = :cOTelecopie"),
    @NamedQuery(name = "FCollaborateur.findByCOEMail", query = "SELECT f FROM FCollaborateur f WHERE f.cOEMail = :cOEMail"),
    @NamedQuery(name = "FCollaborateur.findByCOReceptionnaire", query = "SELECT f FROM FCollaborateur f WHERE f.cOReceptionnaire = :cOReceptionnaire"),
    @NamedQuery(name = "FCollaborateur.findByPROTNo", query = "SELECT f FROM FCollaborateur f WHERE f.pROTNo = :pROTNo"),
    @NamedQuery(name = "FCollaborateur.findByCOTelPortable", query = "SELECT f FROM FCollaborateur f WHERE f.cOTelPortable = :cOTelPortable"),
    @NamedQuery(name = "FCollaborateur.findByCOChargeRecouvr", query = "SELECT f FROM FCollaborateur f WHERE f.cOChargeRecouvr = :cOChargeRecouvr"),
    @NamedQuery(name = "FCollaborateur.findByCbProt", query = "SELECT f FROM FCollaborateur f WHERE f.cbProt = :cbProt"),
    @NamedQuery(name = "FCollaborateur.findByCbMarq", query = "SELECT f FROM FCollaborateur f WHERE f.cbMarq = :cbMarq"),
    @NamedQuery(name = "FCollaborateur.findByCbCreateur", query = "SELECT f FROM FCollaborateur f WHERE f.cbCreateur = :cbCreateur"),
    @NamedQuery(name = "FCollaborateur.findByCbModification", query = "SELECT f FROM FCollaborateur f WHERE f.cbModification = :cbModification"),
    @NamedQuery(name = "FCollaborateur.findByCbReplication", query = "SELECT f FROM FCollaborateur f WHERE f.cbReplication = :cbReplication"),
    @NamedQuery(name = "FCollaborateur.findByCbFlag", query = "SELECT f FROM FCollaborateur f WHERE f.cbFlag = :cbFlag")})
public class FCollaborateur implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "CO_No")
    private Integer cONo;
    @Column(name = "CO_Nom")
    private String cONom;
    @Lob
    @Column(name = "cbCO_Nom")
    private byte[] cbCONom;
    @Column(name = "CO_Prenom")
    private String cOPrenom;
    @Lob
    @Column(name = "cbCO_Prenom")
    private byte[] cbCOPrenom;
    @Column(name = "CO_Fonction")
    private String cOFonction;
    @Lob
    @Column(name = "cbCO_Fonction")
    private byte[] cbCOFonction;
    @Column(name = "CO_Adresse")
    private String cOAdresse;
    @Column(name = "CO_Complement")
    private String cOComplement;
    @Column(name = "CO_CodePostal")
    private String cOCodePostal;
    @Column(name = "CO_Ville")
    private String cOVille;
    @Column(name = "CO_CodeRegion")
    private String cOCodeRegion;
    @Column(name = "CO_Pays")
    private String cOPays;
    @Column(name = "CO_Service")
    private String cOService;
    @Column(name = "CO_Vendeur")
    private Short cOVendeur;
    @Column(name = "CO_Caissier")
    private Short cOCaissier;
    @Column(name = "CO_DateCreation")
    @Temporal(TemporalType.TIMESTAMP)
    private Date cODateCreation;
    @Column(name = "CO_Acheteur")
    private Short cOAcheteur;
    @Column(name = "CO_Telephone")
    private String cOTelephone;
    @Column(name = "CO_Telecopie")
    private String cOTelecopie;
    @Column(name = "CO_EMail")
    private String cOEMail;
    @Column(name = "CO_Receptionnaire")
    private Short cOReceptionnaire;
    @Column(name = "PROT_No")
    private Integer pROTNo;
    @Column(name = "CO_TelPortable")
    private String cOTelPortable;
    @Column(name = "CO_ChargeRecouvr")
    private Short cOChargeRecouvr;
    @Column(name = "cbProt")
    private Short cbProt;
    @Id
    @Basic(optional = false)
    @Column(name = "cbMarq")
    private Integer cbMarq;
    @Column(name = "cbCreateur")
    private String cbCreateur;
    @Column(name = "cbModification")
    @Temporal(TemporalType.TIMESTAMP)
    private Date cbModification;
    @Column(name = "cbReplication")
    private Integer cbReplication;
    @Column(name = "cbFlag")
    private Short cbFlag;
    @OneToMany(mappedBy = "cbCONo")
    private Collection<FComptet> fComptetCollection;
    @OneToMany(mappedBy = "cbCONoCaissier")
    private Collection<FDocentete> fDocenteteCollection;
    @OneToMany(mappedBy = "cbCONo")
    private Collection<FDocentete> fDocenteteCollection1;
    @JoinColumn(name = "cbPROT_No", referencedColumnName = "PROT_No")
    @ManyToOne
    private FProtectioncpta cbPROTNo;
    @OneToMany(mappedBy = "cbCONoCaissier")
    private Collection<FCaisse> fCaisseCollection;
    @OneToMany(mappedBy = "cbCONo")
    private Collection<FCaisse> fCaisseCollection1;
    @OneToMany(mappedBy = "cbCONo")
    private Collection<FDocligne> fDocligneCollection;

    public FCollaborateur() {
    }

    public FCollaborateur(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public Integer getCONo() {
        return cONo;
    }

    public void setCONo(Integer cONo) {
        this.cONo = cONo;
    }

    public String getCONom() {
        return cONom;
    }

    public void setCONom(String cONom) {
        this.cONom = cONom;
    }

    public byte[] getCbCONom() {
        return cbCONom;
    }

    public void setCbCONom(byte[] cbCONom) {
        this.cbCONom = cbCONom;
    }

    public String getCOPrenom() {
        return cOPrenom;
    }

    public void setCOPrenom(String cOPrenom) {
        this.cOPrenom = cOPrenom;
    }

    public byte[] getCbCOPrenom() {
        return cbCOPrenom;
    }

    public void setCbCOPrenom(byte[] cbCOPrenom) {
        this.cbCOPrenom = cbCOPrenom;
    }

    public String getCOFonction() {
        return cOFonction;
    }

    public void setCOFonction(String cOFonction) {
        this.cOFonction = cOFonction;
    }

    public byte[] getCbCOFonction() {
        return cbCOFonction;
    }

    public void setCbCOFonction(byte[] cbCOFonction) {
        this.cbCOFonction = cbCOFonction;
    }

    public String getCOAdresse() {
        return cOAdresse;
    }

    public void setCOAdresse(String cOAdresse) {
        this.cOAdresse = cOAdresse;
    }

    public String getCOComplement() {
        return cOComplement;
    }

    public void setCOComplement(String cOComplement) {
        this.cOComplement = cOComplement;
    }

    public String getCOCodePostal() {
        return cOCodePostal;
    }

    public void setCOCodePostal(String cOCodePostal) {
        this.cOCodePostal = cOCodePostal;
    }

    public String getCOVille() {
        return cOVille;
    }

    public void setCOVille(String cOVille) {
        this.cOVille = cOVille;
    }

    public String getCOCodeRegion() {
        return cOCodeRegion;
    }

    public void setCOCodeRegion(String cOCodeRegion) {
        this.cOCodeRegion = cOCodeRegion;
    }

    public String getCOPays() {
        return cOPays;
    }

    public void setCOPays(String cOPays) {
        this.cOPays = cOPays;
    }

    public String getCOService() {
        return cOService;
    }

    public void setCOService(String cOService) {
        this.cOService = cOService;
    }

    public Short getCOVendeur() {
        return cOVendeur;
    }

    public void setCOVendeur(Short cOVendeur) {
        this.cOVendeur = cOVendeur;
    }

    public Short getCOCaissier() {
        return cOCaissier;
    }

    public void setCOCaissier(Short cOCaissier) {
        this.cOCaissier = cOCaissier;
    }

    public Date getCODateCreation() {
        return cODateCreation;
    }

    public void setCODateCreation(Date cODateCreation) {
        this.cODateCreation = cODateCreation;
    }

    public Short getCOAcheteur() {
        return cOAcheteur;
    }

    public void setCOAcheteur(Short cOAcheteur) {
        this.cOAcheteur = cOAcheteur;
    }

    public String getCOTelephone() {
        return cOTelephone;
    }

    public void setCOTelephone(String cOTelephone) {
        this.cOTelephone = cOTelephone;
    }

    public String getCOTelecopie() {
        return cOTelecopie;
    }

    public void setCOTelecopie(String cOTelecopie) {
        this.cOTelecopie = cOTelecopie;
    }

    public String getCOEMail() {
        return cOEMail;
    }

    public void setCOEMail(String cOEMail) {
        this.cOEMail = cOEMail;
    }

    public Short getCOReceptionnaire() {
        return cOReceptionnaire;
    }

    public void setCOReceptionnaire(Short cOReceptionnaire) {
        this.cOReceptionnaire = cOReceptionnaire;
    }

    public Integer getPROTNo() {
        return pROTNo;
    }

    public void setPROTNo(Integer pROTNo) {
        this.pROTNo = pROTNo;
    }

    public String getCOTelPortable() {
        return cOTelPortable;
    }

    public void setCOTelPortable(String cOTelPortable) {
        this.cOTelPortable = cOTelPortable;
    }

    public Short getCOChargeRecouvr() {
        return cOChargeRecouvr;
    }

    public void setCOChargeRecouvr(Short cOChargeRecouvr) {
        this.cOChargeRecouvr = cOChargeRecouvr;
    }

    public Short getCbProt() {
        return cbProt;
    }

    public void setCbProt(Short cbProt) {
        this.cbProt = cbProt;
    }

    public Integer getCbMarq() {
        return cbMarq;
    }

    public void setCbMarq(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public String getCbCreateur() {
        return cbCreateur;
    }

    public void setCbCreateur(String cbCreateur) {
        this.cbCreateur = cbCreateur;
    }

    public Date getCbModification() {
        return cbModification;
    }

    public void setCbModification(Date cbModification) {
        this.cbModification = cbModification;
    }

    public Integer getCbReplication() {
        return cbReplication;
    }

    public void setCbReplication(Integer cbReplication) {
        this.cbReplication = cbReplication;
    }

    public Short getCbFlag() {
        return cbFlag;
    }

    public void setCbFlag(Short cbFlag) {
        this.cbFlag = cbFlag;
    }

    @XmlTransient
    public Collection<FComptet> getFComptetCollection() {
        return fComptetCollection;
    }

    public void setFComptetCollection(Collection<FComptet> fComptetCollection) {
        this.fComptetCollection = fComptetCollection;
    }

    @XmlTransient
    public Collection<FDocentete> getFDocenteteCollection() {
        return fDocenteteCollection;
    }

    public void setFDocenteteCollection(Collection<FDocentete> fDocenteteCollection) {
        this.fDocenteteCollection = fDocenteteCollection;
    }

    @XmlTransient
    public Collection<FDocentete> getFDocenteteCollection1() {
        return fDocenteteCollection1;
    }

    public void setFDocenteteCollection1(Collection<FDocentete> fDocenteteCollection1) {
        this.fDocenteteCollection1 = fDocenteteCollection1;
    }

    public FProtectioncpta getCbPROTNo() {
        return cbPROTNo;
    }

    public void setCbPROTNo(FProtectioncpta cbPROTNo) {
        this.cbPROTNo = cbPROTNo;
    }

    @XmlTransient
    public Collection<FCaisse> getFCaisseCollection() {
        return fCaisseCollection;
    }

    public void setFCaisseCollection(Collection<FCaisse> fCaisseCollection) {
        this.fCaisseCollection = fCaisseCollection;
    }

    @XmlTransient
    public Collection<FCaisse> getFCaisseCollection1() {
        return fCaisseCollection1;
    }

    public void setFCaisseCollection1(Collection<FCaisse> fCaisseCollection1) {
        this.fCaisseCollection1 = fCaisseCollection1;
    }

    @XmlTransient
    public Collection<FDocligne> getFDocligneCollection() {
        return fDocligneCollection;
    }

    public void setFDocligneCollection(Collection<FDocligne> fDocligneCollection) {
        this.fDocligneCollection = fDocligneCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cbMarq != null ? cbMarq.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FCollaborateur)) {
            return false;
        }
        FCollaborateur other = (FCollaborateur) object;
        if ((this.cbMarq == null && other.cbMarq != null) || (this.cbMarq != null && !this.cbMarq.equals(other.cbMarq))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityprojet.FCollaborateur[ cbMarq=" + cbMarq + " ]";
    }
    
}
